package com.example.auth.convert;

import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.example.auth.consts.IndexConst;

/**
 * @Author 李某人
 * @Date 2023/7/13 19:30
 * @Version 1.0
 */
public class StatusConvert implements Converter<Integer> {
    @Override
    public WriteCellData<?> convertToExcelData(Integer value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        return new WriteCellData<String>(IndexConst.ONE_VALUE.equals(value)?"有效":"无效");
    }
}
